<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>南通统计局数据采集平台</title>
    <link rel="stylesheet" href="../assets/css/style.css">
    <link rel="stylesheet" href="../assets/css/jquery.treeview.css"/>
    <link rel="stylesheet" href="../assets/js/ztree/zTreeStyle.css"/>
    <style>
        #moduleName {
            width: 200px;
            border: 1px solid #ccc;
            height: 30px;
        }
    </style>
</head>
<body>
<!--黑幕-->
<div id="darkdiv">

</div>

<div class="tj-main">
    <div class="tj-left" style="padding-top: 0;">
        <div class="tj-ewbb-span mt0">
            <img src="../assets/img/ewbb-jt.png"><span>指标来源</span>
        </div>
        <div class="tj-box">
            <div>
                <span class="checkbox">
                  <input id="exampleCheckbox" type="checkbox">
                  <label for="exampleCheckbox">全选</label>
                </span>
            </div>
            <div class="tj-box-1 mt20" id="guideLine">
                <ul id="tree1" class="filetree">
                    
                </ul>
            </div>
        </div>
        <div class="tj-ewbb-span mt0">
            <img src="../assets/img/ewbb-jt.png"><span>分组列表</span>
        </div>
        <div class="tj-box">
            <div class="tj-box-1">
                <ul id="201-1FenZu" class="filetree zhulanFenzu">
                    <li style="padding-bottom: 0"><span class="folder" style="color: #333">201-1</span>
                        <ul>
                        </ul>
                    </li>
                </ul>
                <ul id="customFenZu" class="filetree zhulanFenzu">
                    <li style="padding-bottom: 0"><span class="folder" style="color: #333">自定义分组</span>
                        <ul>

                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <div class="tj-right">
        <div class="top-head">
            <span class="ml10">
                <img src="../assets/img/ewbb-jt.png">
            </span>
            <span class="ewbb-title">预览显示区</span>
            <span class="ml10">
                报告期：
                <select class="head-select">
                    <option>201710MM</option>
                </select>
            </span>
        </div>
        <div class="main-box">
            <h1 class="h-title">临时汇总</h1>
            <div class="mt20" style="overflow:hidden;">
                <div class="fl">
                    <span>汇总机构名称：</span>
                    <span class="color-black">南通市统计局</span>
                </div>
                <div class="fr">
                    <span>报告期：</span>
                    <span class="color-black">2017年10月</span>
                </div>
            </div>
            <table cellpadding="0" cellspacing="0" class="JS_table tj-right-table main-table table-demo">
                <thead>
                    <tr>
                        <td>项目</td>
                        <td>代码</td>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>总计</td>
                    </tr>
                </tbody>
            </table>
            <div class="mt5" style="overflow:hidden;">
                <div class="fl">
                    <span>操作人：</span>
                    <span class="color-black">测试</span>
                </div>
                <div class="fr">
                    <span>汇总时间：</span>
                    <span class="color-black">2017年11月27日</span>
                </div>
            </div>
            <div class="jg-bottom-btn mt20 btn-list">
                <button class="basic-btn tj-bj-btn-qt" onclick="showSet()"></button>
                <button class="basic-btn tj-bj-btn-wh"></button>
                <button class="basic-btn tj-bj-btn-set"></button>
                <button class="basic-btn tj-bj-btn-hz"></button>
                <button class="basic-btn tj-bj-btn-save" onclick="uploadNodes()"></button>
                <button class="basic-btn tj-bj-btn-close"></button>
            </div>
        </div>
    </div>
</div>


<!--设置嵌套-->
<div id="tj-set" class="openbg">
    <div class="xx-desk">
        <div class="remindtop"><span>主、宾栏设置</span><img onclick="closeSet();"
 src="../assets/img/showclose.jpg"></div>
        <div class="add-desk-main">
            <ul id="treeDemo" class="ztree">
                
            </ul>
        </div>
        <div class="add-desk-mbtn">
            <button type="button" onclick="saveTree()">确定</button>
            <button type="button" onclick="closeSet();" style="background-color: #a4aaad;">取消</button>
        </div>
    </div>
</div>

<script type="text/javascript" src="../assets/js/jquery.min.js"></script>
<script src="../assets/js/jquery.treeview.js" type="text/javascript"></script>
<script src="../assets/js/ztree/jquery.ztree.core-3.2.js" type="text/javascript"></script>
<script src="../assets/js/ztree/jquery.ztree.excheck-3.2.js" type="text/javascript"></script>
<script src="../assets/js/ztree/jquery.ztree.exedit-3.2.js" type="text/javascript"></script>
<script type="text/javascript" src="../assets/js/layer/layer.js"></script>
<script src="../assets/js/ztree/function.js"></script>
<script src="../assets/js/common.js"></script>
<script src="../assets/js/function.js"></script>
<script src="../assets/js/gTable.js"></script>
<script type="text/javascript">

    var blNameArrays = new Array(),zlNameArrays = new Array(), zNodes = [], flag = 0,saveNodes = [];
    var originBlNameArrays = [];
    var originZlNameArrays = [];

    var columnList = []
    var rowList = {}

    var calcResult = null;
    var blNameArrayToShow = []
    var zlNameArrayToShow = []
    var treeBlDate = []

    var totalSaveBtnEnable = false;

    var layer,laydate;
    var url = GetRequest(),values = 0,
        num = url.rnum;

    function uploadNodes(){
        if(totalSaveBtnEnable || !totalSaveBtnEnable){
            totalSaveBtnEnable = false

            var treeObj = $.fn.zTree.getZTreeObj("treeDemo");
            if(!treeObj){
                createTree()
                treeObj = $.fn.zTree.getZTreeObj("treeDemo");
            }
            var nodes = treeObj.getNodes();
            var pxh = 0
            var rnum = []
            var blArr = getBlArr(nodes[0].children || [])
            pxh = 0
            var zlArr = getZlArr(nodes[1].children || [])
            if(blArr.length == 0 || zlArr.length == 0){
                return
            }
            layer.tab({
                area: ['500px', '350px'],
                tab: [{
                title: '设置模块名称', 
                content: '<div class="info-box">'
                    +'<input id="moduleName"/></div>'
                }],
                btn: ['确定','取消'], //按钮,
                yes:function(index){
                    var tempRnum = rnum.join('&')
                    if(tempRnum[tempRnum.length-1] == "&"){
                        tempRnum = tempRnum.substr(0,tempRnum.length-1)
                    }
                    var name = document.getElementById('moduleName').value
                    if(name.length > 0){
                        postJSONData(URL+'saveOrUpdateGroupReportData.do',{
                            data:JSON.stringify({
                                report:{
                                    rnum:tempRnum,
                                    title:name,
                                    isTotal:'Y'
                                },
                                row:zlArr,//,/zlArr,
                                column:blArr//blArr
                            })
                        },function(json){
                            console.log(json)
                        })
                        layer.close(index);
                    } else {
                        alert('名字不能为空！')
                    }
                },
                btn2:function(){
                }
            });            
        }

        function getBlArr(arr){
            var timeArr = ['${CURYEAR}${CURMONTH}','${CURYEAR}${CURMONTH-1}','${CURYEAR-1}${CURMONTH}']
            var result = []
            console.log(arr)
            for(var i=0;i<arr.length;i++){
                var obj = {
                    "name":arr[i].name,
                    "display":arr[i].display,
                    "pxh":pxh,
                }
                if(!arr[i].children){
                    
                    obj["zb"]=arr[i].indexDm
                    obj["rangeCondition"]=""
                    obj["name"]=arr[i].name
                    obj["display"]=arr[i].display
                    if(arr[i].hasOwnProperty('express')){
                        obj["columnType"]='EXPRESS'
                        obj["starttime"]="${CURYEAR-1}${CURMONTH}"
                        obj["endtime"]="${CURYEAR-1}${CURMONTH}"
                        obj["columnAdded"]=arr[i].express
                        obj["columnName"]=arr[i].rnum+'.'+arr[i].indexColumn
                    } else {
                        obj["columnType"]="SUM"
                        obj["starttime"]=timeArr[arr[i].starttime]
                        obj["endtime"]=timeArr[arr[i].endtime]
                        obj["columnAdded"]=arr[i].express
                        obj["columnName"]=arr[i].rnum+'.'+arr[i].indexColumn
                    }
                } else {
                    obj.children = getBlArr(arr[i].children)
                }
                pxh++;
                if(rnum.indexOf(arr[i].rnum) < 0){
                    rnum.push(arr[i].rnum)
                }
                result.push(obj)
            }
            return result
        }
        function getZlArr(arr){
            var result = [];
            console.log(arr)
            for(var i=0;i<arr.length;i++){
                var obj = {
                    'pxh':pxh,
                    'groupName':arr[i].name,
                    'groupType':arr[i].groupType,
                    'groupColumn':arr[i].groupColumn,
                    'groupAdded':arr[i].cs,
                }
                pxh++
                if(arr[i].children){
                    obj.children = getZlArr(arr[i].children)
                }
                result.push(obj)
            }                    
            return result                                                                     
        }
    }

    function getSaveTypeNodes(arr){

    }
    $(document).ready(function(){
        if(num){
            num = num.split(',');
        }else{
            num = ['B203'];
        }
        for(var i= 0; i< num.length; i++){
            var name = num[i].toString();
            var html = '';
            (function reload(name){
                getJSONData(URL+'getSupportStatisticsColumnList.do?rnum='+name,function(data){
                    columnList[name] = data
                        html +='<li style="padding-bottom: 0"><span class="folder" style="color: #333">'+name+'</span>'
                        html += '<ul>';
                        $.each(data.zblist,function(index,value){
                            values ++;
                            html += '<li>'
                                        +'<span class="checkbox">'
                                          +'<input id="list-'+values+'" type="checkbox" value="'+value.NAME+'('+value.ZBDM+')" data-index="'+values+'" data-rnum="'+name+'" data-indexdm="'+value.ZBDM+'" data-indexcolumn="'+data.collist[0].COLBM+'">'
                                          +'<label for="list-'+values+'">'+value.NAME+'('+value.ZBDM+')</label>'
                                        +'</span>'
                                    +'</li>';
                        });
                        html += '</ul>'
                        html += '</li>';
                        $('#guideLine #tree1').html('');
                        $('#guideLine #tree1').html(html);
                        $("#tree1").treeview({
                            animated: "fast",
                            collapsed: true,
                        });
                        $('#tree1 li ul li input[type=checkbox]').change(function(){
                            flag = 0;
                            var checkBox2 = $('#tree1 li ul li input[type=checkbox]')
                            blNameArrays = []
                            for(var i=0;i<checkBox2.length;i++){
                                if(checkBox2[i].checked){
                                    var value1 = $(checkBox2[i]).val();
                                    var index = $(checkBox2[i]).data('index');
                                    var treeNode= {
                                        'id': 11+index,
                                        'pId': 1,
                                        'name': $.trim(value1),
                                        '': "drag:true,drop:true",
                                        'rnum': $(checkBox2[i]).data('rnum'),
                                        'indexDm': $(checkBox2[i]).data('indexdm'),
                                        'indexColumn': $(checkBox2[i]).data('indexcolumn'),
                                        'starttime': 0,
                                        'endtime': 0,
                                        'display': 'Y',
                                        'pxh': '',
                                        'columnType': 'SUM'
                                    }
                                    blNameArrays.push(treeNode);
                                }
                            }
                            var obj = {
                                'id': 1,
                                'pId': 0,
                                'name': '宾栏',
                                '': 'open:true,drag:false'
                            }
                            blNameArrays.unshift(obj);
                            
                            if(blNameArrays.length > 0){
                                var container = document.getElementsByClassName('table-demo')[0]
                                generateTable([getTreeJson(blNameArrays.slice(1),1),getTreeJson(zlNameArrays.slice(1),1)],container)
                            }
                        });
                    })
            })(name)
        }

        getJSONData(URL+'getSupportGroupList.do',function(data){
            rowList = data;
            var firstHtml = '', customHtml = '';
            $.each(data.normal,function(index,value){
                firstHtml += '<li>'
                                +'<span class="checkbox">'
                                  +'<input id="li-'+index+'" type="checkbox" data-index="11'+index+'" value="'+value.NAME+'" data-groupColumn="'+value.COLBM+'" data-groupType="NORMAL">'
                                  +'<label for="li-'+index+'">'+value.NAME+'</label>'
                                firstHtml +='</span>'
                                var strLength = value.SCHEME.split(',');
                                firstHtml +='<select class="select-box" >'
                                for(var i =0; i< strLength.length; i++){
                                    firstHtml += '<option value="'+i+'">第'+(i+1)+'层</option>'
                                }
                                firstHtml +='</select>'
                            firstHtml +='</li>'
            });
            $.each(data.custom,function(index,value){
                customHtml += '<li>'
                                +'<span class="checkbox">'
                                  +'<input id="li2-'+index+'" type="checkbox" data-index="12'+index+'" value="'+value.NAME+'" data-groupType="CUSTOM">'
                                  +'<label for="li2-'+index+'">'+value.NAME+'</label>'
                                +'</span>'
                            +'</li>'
            });
            //201-1分组
            $('#201-1FenZu li ul').html('');
            $('#201-1FenZu li ul').html(firstHtml);
            $("#201-1FenZu").treeview({
                animated: "fast"
            });
            //自定义分组
            $('#customFenZu li ul').html('');
            $('#customFenZu li ul').html(customHtml);
            $("#customFenZu").treeview({
                animated: "fast"
            });

            $('.zhulanFenzu li ul li input[type=checkbox]').change(function(){
                console.log($(this).parent().parent())
                var li = $(this).parent().parent()
                var select = li.find('select')[0]
                console.log(select)
                var cs = 1
                if(select){
                    cs = select.selectedIndex + 1
                }
                flag = 0;
                var checkBoxs = $('.zhulanFenzu li ul li input[type=checkbox]')
                zlNameArrays = []
                for(var i=0;i<checkBoxs.length;i++){
                    if(checkBoxs[i].checked){
                        var value2 = $(checkBoxs[i]).val();
                        var index = $(checkBoxs[i]).data('index');
                        var treeNode2= {
                            'id': 2+index,
                            'pId': 2,
                            'name': $.trim(value2),
                            'cs':cs,
                            '': "drag:true,drop:true",
                            'groupColumn': $(checkBoxs[i]).data('groupcolumn'),
                            'groupAdded': '',
                            'pxh': '',
                            'groupType': $(checkBoxs[i]).data('grouptype')
                        }
                        zlNameArrays.push(treeNode2);
                    }
                }
                if(this.checked){
                    $(this).parent('.checkbox').siblings('.select-box').show();
                    $(this).parent('.checkbox').siblings('.select-box').change(function(){
                        console.log(this)
                        var cs2 = this.selectedIndex
                        for(var i=0;i<zlNameArrays.length;i++){
                            if(zlNameArrays[i].id == 2+index){
                                zlNameArrays[i].cs = cs2+1
                                break
                            }
                        }
                    })
                }else{
                    $(this).parent('.checkbox').siblings('.select-box').hide();
                }
                var obj2 = {
                    'id': 2,
                    'pId': 0,
                    'name': '主栏',
                    '': 'open:true,drag:false'
                }
                zlNameArrays.unshift(obj2);
              
               if(zlNameArrays.length > 0){
                    var container = document.getElementsByClassName('table-demo')[0]
                    console.log("+++++++++++---------------")
                    getBlNameArr(zlNameArrays)    
                    getZlNameArr(blNameArrays)   
                    generateTable([getTreeJson(blNameArrays.slice(1),1),getTreeJson(zlNameArrays.slice(1),1)],container)
                }
            });
        });
    });


    function setNameArr(){

    }

    function showSet(){
        $("#darkdiv").show();
        $('#tj-set').show(300);
        createTree();

        function copyItem(item){
            if(item instanceof Array){
                var arr = []
                for(var key in item){
                    arr[key] = copyItem(item[key])
                }
                return arr
            } else if(item instanceof Object){
                var obj = {}
                for(var key in item){
                    obj[key] = copyItem(item[key])
                }
                return obj
            } else {
                return item
            }
        }
        originBlNameArrays = copyItem(blNameArrays)
        originZlNameArrays = copyItem(zlNameArrays)
    }

    function copyItem2(item){
        if(item instanceof Array){
            var arr = []
            for(var key in item){
                arr[key] = copyItem2(item[key])
            }
            return arr
        } else if(item instanceof Object){
            var obj = {}
            for(var key in item){
                obj[key] = copyItem2(item[key])
            }
            return obj
        } else {
            return item
        }
    }

    function closeSet(){
        $("#darkdiv").hide();
        $('#tj-set').hide(200);

        blNameArrays = originBlNameArrays
        zlNameArrays = originZlNameArrays
    }

    //画树
    function createTree(){
        console.log('create tree')
        var treeObj;
        var setting = {
            view: {
                addHoverDom: addHoverDom,
                removeHoverDom: removeHoverDom,
                selectedMulti: false
            },
            edit: {
                drag: {
                    autoExpandTrigger: true,
                    prev: dropPrev,
                    inner: dropInner,
                    next: dropNext
                },
                enable: true,
                editNameSelectAll: true,
                showRemoveBtn: showRemoveBtn,
                showRenameBtn: showRenameBtn
            },
            data: {
                simpleData: {
                    enable: true
                }
            },
            callback: {
                beforeDrag: beforeDrag,
                beforeDrop: beforeDrop,
                onDrop:onDrop
            }
        };  
        if(flag == 0){
            
            zNodes = (blNameArrays instanceof Array ? blNameArrays : [blNameArrays]).concat((zlNameArrays instanceof Array) ? zlNameArrays : [zlNameArrays]);
        }else{
            zNodes = saveNodes;
        }
        var zNodes2 = []
        console.log(zNodes)
        for(var i=0;i<zNodes.length;i++){
            var node = copyItem2(zNodes[i])
            // delete node.children
            zNodes2.push(node)
        }

        treeObj = $.fn.zTree.init($("#treeDemo"), setting, zNodes2);
        treeObj.expandAll(true);
    }

    function saveTree(){
        /*if(!totalSaveBtnEnable){
            $("#darkdiv").hide();
            $('#tj-set').hide(200);
            return
        }*/
        totalSaveBtnEnable = false
        flag = 1;
        saveNodes = [];
        var treeObj = $.fn.zTree.getZTreeObj("treeDemo");
        var nodes = treeObj.getNodes();
        var treeData = new Array();
        var blIncludeArray = new Array(),zlIncludeArray = new Array();
        //zTree保存格式
        for(var m=0;m<nodes.length;m++){
            var subNodes = nodes[m].children;
            //console.log(subNodes)
            if(m == 0 ){//宾栏
                saveNodes.push({
                    'id': nodes[0].id,
                    'pId': nodes[0].pId,
                    'name': nodes[0].name
                });
                saveNodes = saveNodes.concat(getSubNodes(subNodes,false))
                // getZlNameArr(saveNodes)
            }else{//主栏
                saveNodes.push({
                    'id': nodes[1].id,
                    'pId': nodes[1].pId,
                    'name': nodes[1].name
                });
                saveNodes = saveNodes.concat(getSubNodes(subNodes,true))
                
                // getBlNameArr(saveNodes)
            }
        }
        for(var i=0;i<saveNodes.length;i++){
            if(saveNodes[i].children){
                delete saveNodes[i].children
            }
        }

        function getSubNodes(nodes,iszhul){
            var arr = []
            for(var i=0;i<nodes.length;i++){
                var node = nodes[i]
                arr.push(copyItem2(node))
                if(node.children && node.children.length > 0){
                    arr = arr.concat(getSubNodes(node.children,iszhul))
                }
            }
            return arr;
        }

        for(var m=0;m<nodes.length;m++){
            var subNodes = nodes[m].children;
            //后台保存格式
            if(m == 0 ){//宾栏
                blIncludeArray = getTableNodes(subNodes)
                // console.log(blIncludeArray)
            }else{//主栏
                zlIncludeArray = getTableNodes(subNodes)
                // console.log(zlIncludeArray)
            }
        }

        function getTableNodes(nodes){
            var arr = []
            for(var i=0;i<nodes.length;i++){
                var node = nodes[i]
                var tempNode = {
                    'id': node.id,
                    'pId': node.pId,
                    'name': node.name
                }
                if(node.children && node.children.length > 0){
                    var children = []
                    for(var j=0;j<node.children.length;j++){
                        var childNode = {
                            'id': node.children[j].id,
                             'pId': node.children[j].pId,
                             'name': node.children[j].name
                        }
                        if(node.children[j].children && node.children[j].children.length > 0){
                            childNode.children = getTableNodes(node.children[j].children)
                        }
                        children.push(childNode)
                    }
                    tempNode.children = children
                }
                arr.push(tempNode)
            }
            return arr
            
        }
        
        var container = document.getElementsByClassName('table-demo')[0]

        generateTable([getTreeJson(blIncludeArray,1),getTreeJson(zlIncludeArray,1)],container)

        $("#darkdiv").hide();
        $('#tj-set').hide(200);
    }

    function getBlNameArr(arr){
        blNameArrayToShow = getTreeJson(arr.slice(1),1)
    }

    function getZlNameArr(arr){
        zlNameArrayToShow = getTreeJson(arr.slice(1),2)
    }

    function getTreeJson(zData,startId){
        console.log(zData)
        var arr = [];
        zData = zData.slice(0)
        for(var i=0;i<zData.length;i++){
            var item = copyItem(zData[i])
            item.id = parseInt(startId + '' + (i+1))
            item.pId = startId
            arr.push(item)
            if(item.children && item.children.length > 0){
                var childArr = getChildArr(item.id,item.children)
                arr = arr.concat(childArr)
            }
        }
        return arr

        function getChildArr(pId,arr){
            startIndex = 1
            var result = []
            for(var i=0;i<arr.length;i++){
                var item = copyItem(arr[i])
                item.pId = pId
                item.id = parseInt(pId + '' + startIndex)
                startIndex++
                result.push(item)
                if(item.children &&　item.children.length > 0){
                    var childArr = getChildArr(item.id,item.children)
                    result = result.concat(childArr)
                }                
            }
            return result
        }

        function copyItem(item){
            var result = {};
            for(var key in item){
                result[key] = item[key];
            }
            return result;
        }
    }

    //指标内容
    var zhibiaoHtml = '';
    zhibiaoHtml+='<div class="info-box">'
        +'<ul><li>'
        +'<span class="left-title">指标</span>'
        +'<span class="right-info"><select class="selects"><option></option></select></span>'
        +'<span class="left-title ml20">字段</span>'
        +'<span class="right-info"><select class="selects"><option></option></select></span>'
        +'</li>'
        +'<li>'
        +'<span class="left-title">开始时间</span>'
        +'<span class="right-info"><select class="selects"><option  value="${CURYEAR}${CURMONTH}">当前报告期</option><option value="${CURYEAR}${CURMONTH-1}">上期</option><option value="${CURYEAR-1}${CURMONTH}">去年同期</option><option value="201712">201712</option><option value="201711">201711</option></select></span>'
        +'</li>'
        +'<li>'
        +'<span class="left-title">结束时间</span>'
        +'<span class="right-info"><select class="selects"><option  value="${CURYEAR}${CURMONTH}">当前报告期</option><option value="${CURYEAR}${CURMONTH-1}">上期</option><option value="${CURYEAR-1}${CURMONTH}">去年同期</option><option value="201712">201712</option><option value="201711">201711</option></select></span>'
        +'</li>'
        +'<li>'
        +'<span class="left-title">显示名称</span>'
        +'<span class="right-info"><input type="text" class="layui-text"></span>'
        +'</li>'
        +'<li>'
        +'<span class="left-title">是否显示</span>'
         +'<span class="right-info"><select class="selects"><option>是</option><option>否</option></select></span>'
        +'</li>'
    +'</div>';

    //计算列内容
    var jislHtml = '';
    jislHtml+='<div class="info-box">'
        +'<div class="left-list fl">'
        +'<ul>'
        +'<li>1.存货(千元)</li>'
        +'<li>2.产成品(千元)</li>'
        +'<li>3.产成品(千元)</li>'
        +'<li>4.产成品(千元)</li>'
        +'<li>5.产成品(千元)</li>'
        +'<li>6.产成品(千元)</li>'
        +'</div>'
        +'<div class="right-list fl ml10">'
            +'<ul>'
            +'<li>'
            +'<span class="left-title">显示名称</span>'
            +'<span class="right-info"><input type="text" class="layui-text"></span>'
            +'</li>'
            +'<li>'
            +'<span class="left-title">计算表达式</span>'
            +'<span class="right-info"><textarea type="text" class="layui-area"></textarea></span>'
            +'</li>'
            +'<li>'
            +'<span class="left-title">统计范围</span>'
            +'<span class="right-info"><textarea type="text" class="layui-area"></textarea></span>'
            +'</li>'
            +'<li>'
            +'<span class="left-title">是否显示</span>'
             +'<span class="right-info"><select class="selects"><option>是</option><option>否</option></select></span>'
            +'</li>'
            +'</ul>'
        +'</div>'
     +'</div>';
</script>
</body>
</html>